<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>博客管理登陆</title>

    <link rel="stylesheet" href="../../static/css/homepage.css" th:href="@{/css/homepage.css}">
    <link rel="stylesheet" href="../../static/css/detailpage.css" th:href="@{/css/detailpage.css}">
    <link rel="stylesheet" href="../../static/css/typespage.css" th:href="@{/css/typespage.css}">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
</head>
<body>

<br><br><br><br><br><br><br>
<div class="dt-container hp-padded-tb-massive dt-opacity-mini" style="max-width: 25em !important;">
    <div class="ui middle aligned center aligned grid">
        <div class="column">
            <h2 class="ui teal image header">
                <!--            <img src="assets/images/logo.png" class="image">-->
                <div class="content">
                    <p>管理后台登陆</p>
                </div>
            </h2>
            <form class="ui large form" method="post" action="#" th:action="@{/admin/login}">
                <div class="ui <!--stacked--> segment">
                    <div class="field">
                        <div class="ui left icon input">
                            <i class="user icon"></i>
                            <input type="text" name="username" placeholder="用户名">
                        </div>
                    </div>
                    <div class="field">
                        <div class="ui left icon input">
                            <i class="lock icon"></i>
                            <input type="password" name="password" placeholder="密码">
                        </div>
                    </div>
                    <button class="ui fluid large teal submit button">登陆</button>
                </div>

                <div class="ui error mini message"></div>
                <div class="ui negative mini message" th:unless="${#strings.isEmpty(message)}" th:text="${message}">用户名或密码错误</div>

            </form>

            <!--        <div class="ui message">-->
            <!--            New to us? <a href="#">Sign Up</a>-->
            <!--        </div>-->
        </div>
    </div>
</div>



<script src="http://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
<script>
<!--    验证-->
    $('.ui.form').form({
        fields:{
            username:{
                identifier:'username',
                rules:[{
                    type:'empty',
                    prompt:'请输入用户名'
                }]
            },
            password:{
                identifier:'password',
                rules:[{
                    type:'empty',
                    prompt:'请输入密码'
                }]
            }
        }
    })
</script>
</body>
</html>